import request from '/@/utils/request';

/**
 * 广告
 * @param params 要传的参数值
 * @returns 返回接口数据
 * 广告api接口集合
 */
export function useMarketingApi() {
	return {
		//位置管理
		//查-位置管理列表
		getPositionList: (data) => {
			return request({
				url: '/product/ad-position/list',
				method: 'post',
				data,
			});
		},
		editPosition: (data) => {
			return request({
				url: '/product/ad-position/admin/update',
				method: 'post',
				data,
			});
		},
		addPosition: (data) => {
			return request({
				url: '/product/ad-position/admin/add',
				method: 'post',
				data,
			});
		},
		//广告位置内容列表
		getAdPositionList: (data) => {
			return request({
				url: '/product/position-content/admin/list',
				method: 'post',
				data,
			});
		},
		getAdPositionById: (id) => {
			return request({
				url: `/product/position-content/admin/detail/${id}`,
				method: 'get',
			});
		},
		addAdPosition: (data) => {
			return request({
				url: '/product/position-content/admin/add',
				method: 'post',
				data,
			});
		},
		editAdPosition: (data) => {
			return request({
				url: '/product/position-content/admin/update',
				method: 'post',
				data,
			});
		},
	};
}
